//
//  UNHomeVC.swift
//  UNHimalayas
//
//  Created by MaHaoZhe on 2019/11/21.
//  Copyright © 2019 HachiTech. All rights reserved.
//

import UIKit

class UNHomeVC: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.view.backgroundColor = UIColor.white
        
        self.navigationController?.delegate = self
        
        let mainView = MHZTitleListChainView.init(navigationType: NavigationStyle.NavigationSearchStyle)
        mainView.recommendPageData = ["哈哈哈","嘿嘿嘿哈哈哈","嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿哈哈","嘿嘿","哈哈","嘿嘿","哈哈哈","嘿嘿嘿","哈哈","嘿嘿","哈哈","嘿嘿","哈哈哈"]
        self.view.addSubview(mainView)
        mainView.snp.makeConstraints { (make) in
            make.edges.equalTo(self.view)
        }
        
    }

}


//MARK: - 导航控制器代理方法
extension UNHomeVC: UINavigationControllerDelegate {
    //当前控制器不显示导航
    func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
        
        if viewController.isKind(of: UNHomeVC.self) {
            self.navigationController?.setNavigationBarHidden(true, animated: false)
        }
    }
    
}
